home *** CD-ROM | disk | FTP | other *** search
- /* ======================================================================
- DESC: Demo Agent Routines
-
- PLATFORMS: >= MS IE 4.0
- USAGE NOTES:
- ====================================================================== */
- var AgentType = "Genie";
- var AlertAgentType = "Peedy";
- var MAgntOffsetItem = 30; // For Merlin use 50; for Genie use 30
- var MAgntOffsetSection = 75;
- var Merlin = null; // Global Merlin object
- var AlertAgent = null;
- var TutorAgentRequest = null;
- var AlertAgentRequest = null;
- var TutorAgentLoadStarted = false;
- var AlertAgentLoadStarted = false;
-
- function processDemoAgentInit() {
-
- // Set up the Tutorial & Help Agent
- AgentControl.Connected = true;
- if ( (AgentType != AlertAgentType) || (AlertAgent == null && AlertAgentLoadStarted == false) ) { // check if Character already loaded
- fs = "http://"+document.body.RPMHostIP+":"+document.body.RPMHttpPort;
- MAgntOffsetItem = 30; // defaults
- MAgntOffsetSection = 50;
- MAgntOffsetTreeItem = 20;
- TutorAgentLoadStarted = true;
- if ( AgentType == "Merlin" ) {
- TutorAgentRequest = AgentControl.Characters.Load("Merlin", fs+"/MSChars/Merlin/merlin.acf");
- MAgntOffsetItem = 50;
- MAgntOffsetTreeItem = 50;
- }
- else if ( AgentType == "Genie" ) {
- TutorAgentRequest = AgentControl.Characters.Load("Genie", fs+"/MSChars/Genie/genie.acf");
- MAgntOffsetSection = 75;
- }
- else if ( AgentType == "Peedy" ) {
- TutorAgentRequest = AgentControl.Characters.Load("Peedy", fs+"/MSChars/Peedy/peedy.acf");
- MAgntOffsetTreeItem = 50;
- }
- else {
- TutorAgentRequest = AgentControl.Characters.Load("Robby", fs+"/MSChars/Robby/robby.acf");
- }
- }
- else {
- Merlin = AlertAgent;
- }
- }
- function processDemoAgentRelease() {
-
- if ( AgentType != AlertAgentType ) { // check if Character used by Alert
- if ( Merlin != null ) {
- AgentControl.Characters.Unload(AgentType);
- Merlin = null;
- }
- }
- AgentType = null;
- }
-
- function processAlertAgentInit() {
-
- // Set up the Alert Agent
- AgentControl.Connected = true;
- if ( (AgentType != AlertAgentType) || (Merlin == null && TutorAgentLoadStarted == false) ) { // check if Character already loaded
- fs = "http://"+document.body.RPMHostIP+":"+document.body.RPMHttpPort;
- AlertAgentLoadStarted = true;
- if ( AlertAgentType == "Merlin" ) {
- AlertAgentRequest = AgentControl.Characters.Load("Merlin", fs+"/MSChars/Merlin/merlin.acf");
- }
- else if ( AlertAgentType == "Genie" ) {
- AlertAgentRequest = AgentControl.Characters.Load("Genie", fs+"/MSChars/Genie/genie.acf");
- }
- else if ( AlertAgentType == "Peedy" ) {
- AlertAgentRequest = AgentControl.Characters.Load("Peedy", fs+"/MSChars/Peedy/peedy.acf");
- }
- else {
- AlertAgentRequest = AgentControl.Characters.Load("Robby", fs+"/MSChars/Robby/robby.acf");
- }
- }
- else {
- AlertAgent = Merlin;
- }
- }
- function processAlertAgentRelease() {
- if ( AgentType != AlertAgentType ) { // check if Character used by Tutorial&Help
- if ( AlertAgent != null ) {
- AgentControl.Characters.Unload(AlertAgentType);
- AlertAgent = null;
- }
- }
- AlertAgentType = null;
- }
-
-
- function MerlinAssistance() {
- DemoMode = false;
- return;
- if ( DemoMode ) { // if in Demo mode
- switch ( CurrentPageName ) {
- case "RpmIntro" :
- top.main.ActionPane.processMerlinIntroDemo();
- break;
- case "AnalyzeCharts" :
- top.main.ActionPane.processMerlinAnalyzeChartsDemo();
- break;
- case "AdminReports" :
- top.main.ActionPane.processMerlinAdminReportsDemo();
- break;
- default :
- DemoMode = false;
- }
- }
- }
-
- // Agent Help
- function goPlayHelp() {
- switch ( CurrentPageName ) {
- case "RpmIntro" :
- case "AnalyzeCharts" :
- case "AdminReports" :
- case "AdminAlerts" :
- case "AdminComputers" :
- case "AdminDataBase" :
- case "AdminGroups" :
- case "AdminMonServer" :
- case "AdminPreferences" :
- case "AdminSecurity" :
- case "AdminServers" :
- case "ReviewActiveCounters" :
- case "SchedReports" :
- case "SchedMonitoring" :
- case "ServerWatch" :
- case "ViewReports" :
- case "ViewAlerts" :
- case "FirstTimeSteps" :
- case "ViewEventLogs" :
- case "AdminOIDs" :
- case "ViewTools" :
- case "AdminDomains" :
- case "ViewSNMPTrapDisplay" :
- case "ViewSyslogDisplay" :
- case "ViewEventlogDisplay" :
- case "ViewNetStatus" :
- case "ViewMemoryStatus" :
- case "ViewHDDStatus" :
- top.banner.resetBannerCursor();
- showHelp("Help/"+CurrentPageName+"_Help.htm");
- break;
- default :
- /*
- if ((MAgnt = top.banner.Merlin) == null) // preloaded Agent character
- return; // exit if not defined
- setBannerCursor();
- MAgnt.LanguageID = 0x0409;
- MAgnt.Get("state", "Hiding");
- MAgnt.Get("state", "Showing, Speaking");
- MAgnt.Get("animation", "Read, Confused");
- MAgnt.MoveTo(top.banner.bX+(top.banner.bCw>>1)-80,top.banner.bY,0); // top/center Merlin
- MAgnt.Show();
- MAgnt.Play("Read");
- MAgnt.Play("ReadReturn");
- MAgnt.Play("Confused");
- MAgnt.Speak('I apologize but I cannot seem to find the \\Map="Monitor It"="MonitorIT"\\ help you need. It is not implemented yet.');
- MAgnt.Speak(' \\Mrk=300\\ ');
- MAgnt.Hide();
- break;
- */
- }
- }
-
-
- function setBannerCursor() {
- document.body.style.cursor='wait';
- top.main.ActionPane.document.body.style.cursor = 'wait';
- /*
- if ( CurrentPageName == "RpmIntro" ) {
- top.main.ActionPane.HelpClickUnderL.style.cursor = 'wait';
- top.main.ActionPane.HelpClickImg.style.cursor = 'wait';
- }
- */
- }
-
- function resetBannerCursor() {
- document.body.style.cursor = "auto";
- top.main.ActionPane.document.body.style.cursor = 'auto';
- /*
- if ( CurrentPageName == "RpmIntro" ) {
- top.main.ActionPane.HelpClickUnderL.style.cursor = 'hand';
- top.main.ActionPane.HelpClickImg.style.cursor = 'hand';
- }
- */
- }
-
-
- function processMerlinBookmarks(bid) {
- if ( bid == 1 ) {
- top.main.ActionPane.WelIP = false; // reset Welcome in progress
- }
- /*
- else if ( bid == 2 ) {
- if (top.main.ActionPane.document.title == "View Alerts") {
- top.main.ActionPane.freeAudioOut(); // reset Audio free in View Alerts
- }
- }
- */
- else if ( bid == 10 ) {
- top.main.ActionPane.SetCursor("auto"); // restore cursor
- top.main.ActionPane.SetClickCursor("hand"); // restore cursor
- }
- /*
- else if ( bid >=200 && bid <= 299 ) {
- top.main.ActionPane.processRpmIntroBookmarks(bid);
- }
- else if ( bid == 300 ) {
- top.banner.resetBannerCursor();
- }
- else if ( bid >=301 && bid <= 399 ) {
- top.main.ActionPane.processViewChartsBookmarks(bid);
- }
- else if ( bid >=401 && bid <= 499 ) {
- top.main.ActionPane.processAdminReportsBookmarks(bid);
- }
- */
- }
-
- function GetIntroFirstTime() {
- return true;
- //return ( ( RpmCC_Ban.RegGetKey("Intro") == "Played" ) ? false : true );
- }
- function SetIntroFirstTime(stat) {
- stat = ( stat ) ? "NotPlayed" : "Played";
- //RpmCC_Ban.RegSetKey("Intro", stat);
- }
-
-
-